<?php
class PublicModel extends Model{
	public function add_data($tabName,$data){
		return M($tabName)->add($data);	
	}
	public function del_data($tabName,$id){
		return M($tabName)->where('id='.$id)->delete();	
	}
	public function get_one($tabName,$id){
		return M($tabName)->where('id='.$id)->find();	
	}
	public function upt_date($tabName,$id,$data){
		return M($tabName)->where('id='.$id)->save($data);	
	}	
}
?>